package com.orange.cloud.common.exception;


import com.orange.cloud.common.msg.Msg;

/**
 * @program: ability-platform
 * @description:
 * @author: wsw
 * @create: 2020-05-08 15:24
 **/
public class ServiceException extends RuntimeException {

    private Integer code;

    public ServiceException(String msg) {
        super(msg);
    }

    public ServiceException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public ServiceException(Msg msg) {
        super(msg.getMsg());
        this.code = msg.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

}
